<!-- $Id: order_info.htm 17060 2010-03-25 03:44:42Z liuhui $ -->



{include file="pageheader.htm"}

{insert_scripts files="topbar.js,../js/utils.js,listtable.js,selectzone.js,.common.js"}



{if $user}

<div id="topbar">

  <div align="right"><a href="" onclick="closebar(); return false"><img src="images/close.gif" border="0" /></a></div>

  <table width="100%" border="0">

    <caption><strong> {$lang.buyer_info} </strong></caption>

    <tr>

      <td> {$lang.user_money} </td>

      <td> {$user.formated_user_money} </td>

    </tr>

    <tr>

      <td> {$lang.pay_points} </td>

      <td> {$user.pay_points} </td>

    </tr>

    <tr>

      <td> {$lang.rank_points} </td>

      <td> {$user.rank_points} </td>

    </tr>

    <tr>

      <td> {$lang.rank_name} </td>

      <td> {$user.rank_name} </td>

    </tr>

    <tr>

      <td> {$lang.bonus_count} </td>

      <td> {$user.bonus_count} </td>

    </tr>

  </table>



  {foreach from=$address_list item=address}

  <table width="100%" border="0">

    <caption><strong> {$lang.consignee} : {$address.consignee|escape} </strong></caption>

    <tr>

      <td> {$lang.email} </td>

      <td> <a href="mailto:{$address.email|escape}">{$address.email|escape}</a> </td>

    </tr>

    <tr>

      <td> {$lang.address} </td>

      <td> {$address.address|escape} </td>

    </tr>

    <tr>

      <td> {$lang.zipcode} </td>

      <td> {$address.zipcode|escape} </td>

    </tr>

    <tr>

      <td> {$lang.tel} </td>

      <td> {$address.tel|escape} </td>

    </tr>

    <tr>

      <td> {$lang.mobile} </td>

      <td> {$address.mobile|escape} </td>

    </tr>

  </table>

  {/foreach}

</div>

{/if}



<form action="order.php?act=operate" method="post" name="theForm">

<div class="list-div" style="margin-bottom: 5px">

<table width="100%" cellpadding="3" cellspacing="1">

  <tr>

    <td colspan="4">

      <div align="center">

        <input name="prev" type="button" class="button" onClick="location.href='order.php?act=info&order_id={$prev_id}';" value="{$lang.prev}" {if !$prev_id}disabled{/if} />

        <input name="next" type="button" class="button" onClick="location.href='order.php?act=info&order_id={$next_id}';" value="{$lang.next}" {if !$next_id}disabled{/if} />

        <input type="button" onclick="window.open('order.php?act=info&order_id={$order.order_id}&print=1')" class="button" value="{$lang.print_order}" />

    </div></td>

  </tr>

  <tr>

    <th colspan="4">{$lang.base_info}</th>

  </tr>

  <tr>

    <td width="18%"><div align="right"><strong>{$lang.label_order_sn}</strong></div></td>

    <td width="34%">{$order.order_sn}{if $order.extension_code eq "group_buy"}<a href="group_buy.php?act=edit&id={$order.extension_id}">{$lang.group_buy}</a>{elseif $order.extension_code eq "exchange_goods"}<a href="exchange_goods.php?act=edit&id={$order.extension_id}">{$lang.exchange_goods}</a>{/if} <a href="distribution.php?act=list&order_sn={$order.order_sn}">分销查询</a></td>

    <td width="15%"><div align="right"><strong>{$lang.label_order_status}</strong></div></td>

    <td>{$order.status}</td>

  </tr>

  <tr>

    <td><div align="right"><strong>{$lang.label_user_name}</strong></div></td>

    <td>{$order.user_name|default:$lang.anonymous} {if $order.user_id > 0}[ <a href="" onclick="staticbar();return false;">{$lang.display_buyer}</a> ] {/if}</td>

    <td><div align="right"><strong>{$lang.label_order_time}</strong></div></td>

    <td>{$order.formated_add_time}</td>

  </tr>

  <tr>

    <td><div align="right"><strong>{$lang.label_payment}</strong></div></td>

    <td>{if $order.pay_id > 0}{$order.pay_name}{else}{$lang.require_field}{/if}<a href="order.php?act=edit&order_id={$order.order_id}&step=payment" class="special">{$lang.edit}</a>

    ({$lang.action_note}: <span onclick="listTable.edit(this, 'edit_pay_note', {$order.order_id})">{if $order.pay_note}{$order.pay_note}{else}N/A{/if}</span>)<input type="button" onclick="Ajax.call('/orderquery.php', 'order_sn={$order.order_sn}',function(data){alert(data)},'GET', 'HTML');" class="button" value="查询微信订单">仅团购订单并微信支付可查</td>

    <td><div align="right"><strong>{$lang.label_pay_time}</strong></div></td>

    <td>{$order.pay_time}</td>

  </tr>

  <tr>

    <td><div align="right"><strong>{$lang.label_shipping}</strong></div></td>

    <td>{if $exist_real_goods}{if $order.shipping_id > 0}{$order.shipping_name}{else}{$lang.require_field}{/if}<a href="order.php?act=edit&order_id={$order.order_id}&step=shipping" class="special">{$lang.edit}</a>&nbsp;&nbsp;<input type="button" onclick="window.open('order.php?act=info&order_id={$order.order_id}&shipping_print=1')" class="button" value="{$lang.print_shipping}"> {if $order.insure_fee > 0}（{$lang.label_insure_fee}{$order.formated_insure_fee}）{/if}{/if}</td>

    <td><div align="right"><strong>{$lang.label_shipping_time}</strong></div></td>

    <td>{$order.shipping_time}</td>

  </tr>



  {if $order.team_first eq 1}

 <tr>

    <td><div align="right"><strong>团长优惠：</strong></div></td>

    <td>{if $order.discount_type eq 1 }团长免单{elseif $order.discount_type eq 2}团长优惠【{$order.discount_amount}】{else}无优惠{/if}</td>

    <td><div align="right"><strong></strong></div></td><!--  -->

    <td></td>

  </tr>

  {/if}

  <!-- {if $order.point_id} -->

  <tr>

    <td><div align="right"><strong>自提地址：</strong></div></td>

    <td>{$point_info.region} {$point_info.address} {$point_info.shop_name}{$point_info.mobile}   {$order.best_time}</td>

    <td><div align="right"><strong>验证电话：</strong></div></td>

    <td>{$order.checked_mobile}</td>

  </tr>  

  {if $order.shipping_status eq 2}

  <tr>

    <td><div align="right"><strong>自提状态：</strong></div></td>

    <td>已提货</td>

    <td><div align="right"><strong>操作人：</strong></div></td>

    <td>{$order.op}，id：{$order.op_uid}</td>    

  </tr>

  {/if}

  <!-- {else} -->

  <tr>

    <th colspan="4">{$lang.consignee_info}<a href="order.php?act=edit&order_id={$order.order_id}&step=consignee" class="special">{$lang.edit}</a></th>

  </tr>

  <tr>

    <td><div align="right"><strong>{$lang.label_consignee}</strong></div></td>

    <td>{$order.consignee|escape}</td>

    <td><div align="right"><strong>   公司类别：</strong></div></td>

    <td>{if $order.address_type eq 1}家庭{else}公司{/if}</td>

  </tr>

  <tr>

    <td><div align="right"><strong>{$lang.label_address}</strong></div></td>

    <td>[{$order.region}] {$order.address|escape}</td>

    <td><div align="right"><strong>{$lang.label_mobile}</strong></div></td>

    <td>{$order.mobile|escape}</td>

  </tr>

  <!-- {/if} -->

  <tr>

    <td><div align="right"><strong>{$lang.label_postscript}</strong></div></td>

    <td colspan="3">{$order.postscript}</td>

  </tr>

</table>

</div>



<div class="list-div" style="margin-bottom: 5px">

<table width="100%" cellpadding="3" cellspacing="1">

  <tr>

    <th colspan="7" scope="col">{$lang.goods_info}<!--<a href="order.php?act=edit&order_id={$order.order_id}&step=goods" class="special">{$lang.edit}</a>--></th>

    </tr>

  <tr>

    <td scope="col"><div align="center"><strong>{$lang.goods_name_brand}</strong></div></td>

    <td scope="col"><div align="center"><strong>{$lang.goods_sn}</strong></div></td>

    <td scope="col"><div align="center"><strong>{$lang.goods_price}</strong></div></td>

    <td scope="col"><div align="center"><strong>{$lang.goods_number}</strong></div></td>

    <td scope="col"><div align="center"><strong>{$lang.goods_attr}</strong></div></td>

    <td scope="col"><div align="center"><strong>{$lang.storage}</strong></div></td>

    <td scope="col"><div align="center"><strong>{$lang.subtotal}</strong></div></td>

  </tr>

  {foreach from=$goods_list item=goods}

  <tr>

    <td align="center">

    {if $goods.goods_id gt 0 && $goods.extension_code neq 'package_buy'}

    <a href="../goods.php?id={$goods.goods_id}" target="_blank">{$goods.goods_name} {if $goods.brand_name}[ {$goods.brand_name} ]{/if}

    {if $goods.is_gift}{if $goods.goods_price > 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if}

    {if $goods.parent_id > 0}{$lang.remark_fittings}{/if}</a>

    {elseif $goods.goods_id gt 0 && $goods.extension_code eq 'package_buy'}

    <a href="javascript:void(0)" onclick="setSuitShow({$goods.goods_id})">{$goods.goods_name}<span style="color:#FF0000;">{$lang.remark_package}</span></a>

    <div id="suit_{$goods.goods_id}" style="display:none">

        {foreach from=$goods.package_goods_list item=package_goods_list}

          <a href="../goods.php?id={$package_goods_list.goods_id}" target="_blank">{$package_goods_list.goods_name}</a><br />

        {/foreach}

    </div>

    {/if}

    </td>

    <td align="center">{$goods.goods_sn}</td>

    <td align="center">{$goods.formated_goods_price}</td>

    <td align="center">{$goods.goods_number}

    </td>

    <td align="center">{$goods.goods_attr|nl2br}</td>

    <td align="center">{$goods.storage}</td>

    <td align="center">{$goods.formated_subtotal}</td>

  </tr>

  {/foreach}

  <tr>

    <td></td>

    <td>&nbsp;</td>

    <td>{if $order.total_weight}<div align="right"><strong>{$lang.label_total_weight}

    </strong></div>{/if}</td>

    <td>{if $order.total_weight}<div align="right">{$order.total_weight}

    </div>{/if}</td>

    <td>&nbsp;</td>

    <td><div align="right"><strong>{$lang.label_total}</strong></div></td>

    <td><div align="right">{$order.formated_goods_amount}</div></td>

  </tr>

</table>

</div>



<div class="list-div" style="margin-bottom: 5px">

<table width="100%" cellpadding="3" cellspacing="1">

  <tr>

    <th>{$lang.fee_info}<!--<a href="order.php?act=edit&order_id={$order.order_id}&step=money" class="special">-->{$lang.edit}</a></th>

  </tr>

  <tr>

    <td><div align="right">{$lang.label_goods_amount}<strong>{$order.formated_goods_amount}</strong>

- {$lang.label_discount}<strong>{$order.formated_discount}</strong>    

      + {$lang.label_shipping_fee}<strong>{$order.formated_shipping_fee}</strong>



      + {$lang.label_pay_fee}<strong>{$order.formated_pay_fee}</strong>

</div></td>

  <tr>

    <td><div align="right"> = {$lang.label_order_amount}<strong>{$order.formated_total_fee}</strong></div></td>

  </tr>

  <tr>

    <td><div align="right">

      - {$lang.label_money_paid}<strong>{$order.formated_money_paid}</strong> - {$lang.label_surplus} <strong>{$order.formated_surplus}</strong>

      - {$lang.label_integral} <strong>{$order.formated_integral_money}</strong>

      - {$lang.label_bonus} <strong>{$order.formated_bonus}</strong>

    </div></td>

  <tr>

    <td><div align="right"> = {if $order.order_amount >= 0}{$lang.label_money_dues}<strong>{$order.formated_order_amount}</strong>

      {else}{$lang.label_money_refund}<strong>{$order.formated_money_refund}</strong>

      <input name="refund" type="button" value="{$lang.refund}" onclick="location.href='order.php?act=process&func=load_refund&anonymous={if $order.user_id <= 0}1{else}0{/if}&order_id={$order.order_id}&refund_amount={$order.money_refund}'" />

      {/if}{if $order.extension_code eq "group_buy"}<br />{$lang.notice_gb_order_amount}{/if}</div></td>

  </tr>

</table>



{if $order.is_luck eq 1}

<table cellpadding="3" cellspacing="1">

  <tr>

    <td width="10%"><div align="right"><strong>号码: </strong></div></td>

    <td><div align="left">

    {foreach from=$luck_rows item=luck}

      {if $luck.is_lucker eq 1} <font color="red">幸运号：{$luck.id}</font> {else} <font style="margin-left: 10px;">{$luck.id}</font> {/if}

    {/foreach}

    </div></td>

  </tr>

</table>

</div>

{/if}



<div class="list-div" style="margin-bottom: 5px">

<table cellpadding="3" cellspacing="1">

  <tr>

    <th colspan="6">{$lang.action_info}</th>

  </tr>

  <tr>

    <td><div align="right"><strong>{$lang.label_action_note}</strong></div></td>

  <td colspan="5"><textarea name="action_note" cols="80" rows="3"></textarea></td>

    </tr>

  <tr>

    <td><div align="right"></div>

      <div align="right"><strong>{$lang.label_operable_act}</strong> </div></td>

    <td colspan="5">{if $operable_list.confirm}

      <input name="confirm" type="submit" value="{$lang.op_confirm}" class="button" />

        {/if} {if $operable_list.pay}

        <input name="pay" type="submit" value="{$lang.op_pay}" class="button" />

        {/if} {if $operable_list.unpay}

        <input name="unpay" type="submit" class="button" value="{$lang.op_unpay}" />

        {/if} {if $operable_list.prepare}

        <input name="prepare" type="submit" value="{$lang.op_prepare}" class="button" />

        {/if} {if $operable_list.split}

        <input name="ship" type="submit" value="{$lang.op_split}" class="button" />

        {/if} {if $operable_list.unship}

        <input name="unship" type="submit" value="{$lang.op_unship}" class="button" />

        {/if} {if $operable_list.receive}

        <input name="receive" type="submit" value="{$lang.op_receive}" class="button" />

        {/if} {if $operable_list.cancel}

        <input name="cancel" type="submit" value="{$lang.op_cancel}" class="button" />

        {/if} {if $operable_list.invalid}

        <input name="invalid" type="submit" value="{$lang.op_invalid}" class="button" />

        {/if} {if $operable_list.return}

        <input name="return" type="submit" value="{$lang.op_return}" class="button" />

        {/if} {if $operable_list.to_delivery}

        <input name="to_delivery" type="submit" value="{$lang.op_to_delivery}" class="button"/>

        <input name="order_sn" type="hidden" value="{$order.order_sn}" />

        {/if} <input name="after_service" type="submit" value="{$lang.op_after_service}" class="button" />{if $operable_list.remove}

        <input name="remove" type="submit" value="{$lang.remove}" class="button" onClick="return window.confirm('{$lang.js_languages.remove_confirm}');" />

        {/if}

        {if $operable_list.refund}

        <input name="refund" type="submit" value="退款" class="button" onClick="return window.confirm('你确定要退款吗');" />

        退支付金额<input type="text" name="refund_money" value="" size="6">（留空全退）

        退优惠券<input type="checkbox" name="refund_bonus" value="1" checked>

        退余额支付<input type="checkbox" name="refund_surplus" value="1" checked>

        {/if}

        

        

        {if $order.extension_code eq "group_buy"}{$lang.notice_gb_ship}{/if}

      

        <input name="order_id" type="hidden" value="{$smarty.request.order_id}"></td>

    </tr>

  <tr>

    <th>{$lang.action_user}</th>

    <th>{$lang.action_time}</th>

    <th>{$lang.order_status}</th>

    <th>{$lang.pay_status}</th>

    <th>{$lang.shipping_status}</th>

    <th>{$lang.action_note}</th>

  </tr>

  {foreach from=$action_list item=action}

  <tr>

    <td><div align="center">{$action.action_user}</div></td>

    <td><div align="center">{$action.action_time}</div></td>

    <td><div align="center">{$action.order_status}</div></td>

    <td><div align="center">{$action.pay_status}</div></td>

    <td><div align="center">{$action.shipping_status}</div></td>

    <td>{$action.action_note|nl2br}</td>

  </tr>

  {/foreach}

</table>

</div>

</form>

{literal}

<script language="JavaScript">

{/literal}

  var oldAgencyId = {$order.agency_id|default:0};

{literal}

  onload = function()

  {

    // 开始检查订单

    startCheckOrder();

  }



  /**

   * 把订单指派给某办事处

   * @param int agencyId

   */

  function assignTo(agencyId)

  {

    if (agencyId == 0)

    {

      alert(pls_select_agency);

      return false;

    }

    if (oldAgencyId != 0 && agencyId == oldAgencyId)

    {

      alert(pls_select_other_agency);

      return false;

    }

    return true;

  }

</script>

{/literal}



{include file="pagefooter.htm"}